---
layout: "default"
title: "removeRange"
description: "Swift documentation for 'removeRange': Remove from x the indicated subRange of elements."
keywords: "removeRange,func,swift,documentation"
root: "/v1.2"
---

<div class="declaration" id="func-removerange-c_-rangereplaceablecollectiontype-inout_-c-subrange_-range-c-index">
<a class="toggle-link" data-toggle="collapse" href="#comment-func-removerange-c_-rangereplaceablecollectiontype-inout_-c-subrange_-range-c-index">func <wbr>removeRange&lt;C : RangeReplaceableCollectionType&gt;(<wbr>inout:<wbr> C, subRange: Range&lt;C.Index&gt;)</a>
        
<div class="comment collapse" id="comment-func-removerange-c_-rangereplaceablecollectiontype-inout_-c-subrange_-range-c-index"><div class="p">
    <p>Remove from <code>x</code> the indicated <code>subRange</code> of elements</p>

<p>Invalidates all indices with respect to <code>x</code>.</p>

<p>Complexity: O(<code>count(x)</code>).</p>

    <h4>Declaration</h4>    
    <code class="language-swift">func removeRange&lt;C : RangeReplaceableCollectionType&gt;(inout x: C, subRange: Range&lt;C.Index&gt;)</code>
    
    
</div></div>
</div>
